<?php

namespace App\Models;

use App\Common\Traits\HasPaymentOrders;

class PaymentChannelBase extends Base
{
    use HasPaymentOrders;

    /**
     * 状态: 下单
     */
    const STATUS_PLACE = 1;

    /**
     * 状态: 完成
     */
    const STATUS_COMPLETE = 2;

    /**
     * 状态: 取消
     */
    const STATUS_CANCEL = 3;

    /**
     * 状态: 失败
     */
    const STATUS_FAIL = 4;

    /**
     * 订单类型: 预付货款充值订单
     */
    const ORDER_TYPE_PREPAID_RECHARGE_ORDER = 1;

    /**
     * 订单类型: 支付订单
     */
    const ORDER_TYPE_PAY_ORDER = 2;

    protected $casts = [
        'created_at' => 'datetime:Y-m-d H:i:s',
        'updated_at' => 'datetime:Y-m-d H:i:s',
        'place_order_response_snapshot' => 'array',
        'notify_snapshot' => 'array',
    ];
}
